<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>selection</title>
    <style>
        ::selection {
            background: green;
            color: white;
        }
    </style>
</head>

<body>
    <p>Select the text in this paragraph to see the effect. Vestibulum id ligula porta felis euismod semper. Aenean
        lacinia bibendum nulla sed consectetur. Cras mattis consectetur purus sit amet fermentum. Cum sociis natoque
        penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
</body>

</html>